package com.atguigu.schedule.test;

import com.atguigu.schedule.dao.BaseDao;
import com.atguigu.schedule.pojo.SysUser;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

import java.util.List;

public class testBaseDao {
    private  BaseDao baseDao;
    @BeforeClass
    public void initBaseDao(){
        baseDao=new BaseDao();
    }

    @Test
    public void testBaseDaoObject(){
        String sql="select count(1) from sys_user";
        Long count = baseDao.baseQueryObject(Long.class, sql);
        System.out.println(count);
 }
    @Test
    public void testbaseQ(){
        String sql="select *from sys_user";
        List<SysUser> sysUserList = baseDao.baseQuery(SysUser.class, sql);
        sysUserList.forEach(System.out::println);
    }

}
